package com.yunchao.library.socket.model.card


data class CommandData(
    val dwTimeOut: Int = 0,
    val wType: Int = 0,
    val lpData: LpData? = null,
    val wVersion: Int = 0,
    val dwCommand: Int = 0,
    val wDeviceID: Int = 0
) {
    data class LpData(
        val RequestID: Int = 0,
        val dwEventID: Int = 0,
        val hService: Int = 0,
        val lpBuffer: List<LpBuffer> = emptyList(),
        val tsTimestamp: TsTimestamp = TsTimestamp(),
        val dwCommandCode: Int = 0,
        val hResult: Int = 0
    ) {
        data class LpBuffer(
            val fwWriteMethod: Int = 0,
            val wStatus: Int = 0,
            val ulDataLength: Int = 0,
            val wDataSource: Int = 0,
            val lpbData: String = ""
        )

        data class TsTimestamp(
            val wDay: Int = 0,
            val wYear: Int = 0,
            val wHour: Int = 0,
            val wMonth: Int = 0,
            val wDayOfWeek: Int = 0,
            val wMinute: Int = 0,
            val wMilliseconds: Int = 0,
            val wSecond: Int = 0
        )
    }
}


